package com.topone.permission.dao;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.topone.permission.entity.Role;

@Mapper
public interface RoleMapper {

	//创建role
	public void save(Role role);
	
	//通过userId获取
	public List<Role> findByUserId(Long userId);
	
	//通过companyCode获取一个公司所有角色
	public List<Role> findByCompanyCodeContainSystemRole(@Param("code")String code,@Param("systemCode")String systemCode );

	public Role findById(Long id);
}
